<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:ic="http://ivyteam.ch/jsf/component"
	xmlns:p="http://primefaces.org/ui"
	xmlns:pe="http://primefaces.org/ui/extensions"
	xmlns:pm="http://primefaces.org/mobile">

<h:head>
	<title>JSF Training Mail Application</title>
</h:head>
<h:body>
<p:outputPanel style="width: 350px;margin: 0 auto;">
	<h:form id="loginForm">
		<h:panelGrid id="panel" columns="2" cellpadding="3" cellspacing="1">
			<f:facet name="header">
				<h:outputText value="Login" />
			</f:facet>

			<p:outputLabel value="#{ivy.cms.co('/ch/soreco/tranining/label/username')}" />
			<p:inputText value="#{data.username}" id="userName" required="true"	requiredMessage="Username must not be null" />

			<p:outputLabel value="#{ivy.cms.co('/ch/soreco/tranining/label/password')}" />
			<p:inputText type="password" value="#{data.password}" id="passWord"	required="true" requiredMessage="Password must not be null" />

			<f:facet name="footer">
				<h:panelGroup style="display:block; text-align:center">
					<p:commandButton value="Login" actionListener="#{logic.doLogin}" update="panel" id="login" />
				</h:panelGroup>
			</f:facet>
		</h:panelGrid>
		<p:messages severity="error" autoUpdate="true" />
	</h:form>
	</p:outputPanel>
</h:body>
</html>